package org.jfsm.core;

import java.lang.reflect.Field;
import java.lang.reflect.ParameterizedType;

abstract class FSMSignalM<M> extends FSMSignal {
    private final Class<M> msgClass;

    Class<M> getMsgClass() {
        return msgClass;
    }

    @SuppressWarnings("unchecked")
    FSMSignalM(Field f) {
        msgClass = (Class<M>) ((ParameterizedType) f.getGenericType()).getActualTypeArguments()[0];
    }

}
